{extend name="layout:default" /}
{block name="title"}活动列表{/block}
{block name="content"}
<div class="row">
    <div class="col-xs-12">
        <div class="box">
            <div class="box-header">
                <h3 class="box-title">活动列表</h3>
                <div class="box-tools">
                    <!--<a href="{:url('add')}" class="btn btn-info"> 添加 </a>-->
                </div>
            </div>
            <!-- /.box-header -->
            <div class="box-body table-responsive no-padding">
                <table class="table table-hover">
                    <tbody>
                    <tr>
                        <th>ID</th>
                        <th>用户ID</th>
                        <th>题库ID</th>
                        <th>题目ID</th>
                        <th>答案</th>
                        <th>是否正确</th>
                        <th>答题时间</th>
                        <!--<th>操作</th>-->
                    </tr>
                    {volist name="topic_logs" id="vo"}
                    <tr>
                        <td>{$vo.id}</td>
                        <td>{$vo.uid}</td>
                        <td>{$vo.qid}</td>
                        <td>{$vo.tid}</td>
                        <td>{$vo.answer}</td>
                        <td><?php if($vo['is_right'] === 1){
                                echo '正确';
                             }elseif($vo['is_right'] === 2){
                                echo '错误';
                             }else{
                                echo '暂无结果';
                             }?></td>
                        <td>{:date('Y-m-d H:i:s',$vo.addtime)}</td>
                        <!--<td>
                           <a title="修改" href="{:url('edit',['id'=>$vo.id])}" class="btn btn-success"><i
                                    class="glyphicon glyphicon-edit"></i></a>
                           <a title="删除" href="{:url('del',['id'=>$vo.id])}" class="btn btn-danger"><i
                                    class="glyphicon glyphicon-trash"></i></a>
                        </td>-->
                    </tr>
                    {/volist}
                    </tbody>
                </table>
                {$topic_logs->render()}
            </div>
            <!-- /.box-body -->
        </div>
        <!-- /.box -->
    </div>
</div>
{/block}